Server Error in '/Gaffs.ie' Application.

Specified cast is not valid.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidCastException: Specified cast is not valid.

Source Error:

Line 109:    Private Sub rptSales_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataListItemEventArgs) Handles rptSales.ItemDataBound
Line 110:        If e.Item.ItemType = ListItemType.AlternatingItem OrElse e.Item.ItemType = ListItemType.Item Then                        
Line 111:            If DirectCast(e.Item.DataItem("strImagePath"), String) = String.Empty Then
Line 112:                Response.Write("nothing")
Line 113:            Else

Source File: C:\Inetpub\wwwroot\Gaffs.ie\uctl\SalesRepeater.ascx.vb    Line: 111

Stack Trace:

[InvalidCastException: Specified cast is not valid.]
   Gaffs.ie.SalesRepeater.rptSales_ItemDataBound(Object sender, DataListItemEventArgs e) in C:\Inetpub\wwwroot\Gaffs.ie\uctl\SalesRepeater.ascx.vb:111
   System.Web.UI.WebControls.DataList.OnItemDataBound(DataListItemEventArgs e) +109
   System.Web.UI.WebControls.DataList.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) +139
   System.Web.UI.WebControls.DataList.CreateControlHierarchy(Boolean useDataSource) +689
   System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) +49
   System.Web.UI.WebControls.BaseDataList.DataBind() +23
   Gaffs.ie.SalesRepeater.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\Gaffs.ie\uctl\SalesRepeater.ascx.vb:75
   System.Web.UI.Control.OnLoad(EventArgs e) +67
   System.Web.UI.Control.LoadRecursive() +35
   System.Web.UI.Control.LoadRecursive() +98
   System.Web.UI.Page.ProcessRequestMain() +750


Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032